<template>
    <div>
        <div v-if="hasSlot" >
            <el-collapse class="xy-collapse-search-bar" :value="expand?'item':''">
                <el-collapse-item name="item">
                    <slot></slot>
                </el-collapse-item>
            </el-collapse>
        </div>
        <div class="blank-table-filter" v-if="!hasSlot">&nbsp;</div>
    </div>

</template>

<script>
    /**
     * 下拉搜索框
     * @author yangjunxiong
     * @date 2019/7/22 11:44.
     */
    export default {
        name: 'collapseSearchBar',
        mounted() {
        },
        components: {},
        props: {
            expand:{
                type:Boolean,
                default: true
            }
        },
        data() {
            return {}
        },
        computed: {
            hasSlot () {
                return this.$slots.default
            }
        },
        methods: {

        },
        watch: {},
        filters: {},
        beforeDestroy() {

        }
    }
</script>

<style scoped>
    .blank-table-filter {
        margin: 15px 0 20px 0;
        border-top: 1px solid #ebeef5;
    }
</style>